Přeskočit na hlavní obsah

Module: client/safeFetch

Functions

default

default(input, init?): Promise<Response>

Safe version of fetch that throws if a request returns a non-OK status code.

Parameters

NameType
inputRequestInfo | URL
init?RequestInit

Returns

Promise<Response>

Throws

If the http request fails or the response status is not OK.

Throws

When a network error is encountered or CORS is misconfigured on the server-side.

Defined in

src/web-app/src/client/safeFetch.ts:10